package com.abcd.godating.service;

import java.util.Set;

import com.abcd.godating.constant.SnsProvider;

public interface RelationshipService {
	
	/**
	 * create new account, and put the account into the Neo4j DB
	 * 
	 * @param userId the user id
	 */
	public void creatAccount(long userId);

	/**
	 * get the user's friends' id list base on the SnsProvider
	 * 
	 * @param userId
	 * @param snsProvider
	 * @return
	 */
	public Set<Long> getFriendShips(long userId, SnsProvider snsProvider);
	
	/**
	 * get the user's all friends' id list 
	 * 
	 * @param userId
	 * @return
	 */
	public Set<Long> getFriendShips(long userId);
	
	/**
	 * add the user's friendships
	 * 
	 * @param userId the main user id
	 * @param snsProvider the enumeration of the SNS provide
	 * @param userIds the user id list which is the main user's friends
	 */
	public void addFriendShips(long userId, SnsProvider snsProvider,
			Set<Long> userIds);
	
	/**
	 * update the user's friendships
	 * 
	 * @param userId the main user id 
	 * @param snsProvider	the enumeration of the SNS provide
	 * @param userIds	the user id list which is the main user's friends
	 */
	public void updateFriendShips(long userId, SnsProvider snsProvider,
			Set<Long> userIds);	
	
	/**
	 * delete all the friends of this user
	 * 
	 * @param userId
	 */
	public void deleteFriendShips(long userId);
	
	/**
	 * delete the selected friends
	 * 
	 * @param userId
	 * @param userIds
	 */
	public void deleteFriendShips(long userId, Set<Long> userIds);

	/**
	 * get the friends of the friend
	 * 
	 * @param userId
	 * @param snsProvider
	 * @param depth
	 * @return
	 */
	public Set<Long> getFoaf(long userId, SnsProvider snsProvider, int depth);
}
